package com.oracle.lingshangejia.adapter;

import android.support.annotation.Nullable;
import android.text.TextUtils;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.oracle.lingshangejia.R;
import com.oracle.lingshangejia.bean.FormulateBean;

import java.util.List;

/**
 * @松 on 2019/6/11 09:28
 */
public class ArchivesTypeFormulateAdapter extends BaseQuickAdapter<FormulateBean.DataBean,BaseViewHolder> {

    public ArchivesTypeFormulateAdapter( @Nullable List<FormulateBean.DataBean> data) {
        super(R.layout.item_archivestype_formulate, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, FormulateBean.DataBean item) {
        if (!TextUtils.isEmpty(item.getName()))
        {
            helper.setText(R.id.tv, item.getName());
        }
        if (!TextUtils.isEmpty(item.getContent())){
            helper.setText(R.id.tv_content,item.getContent() );
        }
    }

}
